﻿using TFramework.ECS.Blueprint;
using TFramework.ECS.Collection;
using TFramework.ECS.Component;
using TFramework.ECS.Entity;
using TFramework.ECS.Entity.Manager;
using TFramework.Extensions;
using UnityEngine;
using VContainer.Unity;


public class GamePresenter : IStartable, ITickable
{
    private IEntityCollection entityCollection;
    public GamePresenter(IEntityCollection entityCollection)
    {
        this.entityCollection = entityCollection;
    }

    public void Start()
    {
        for (int i = 0; i < 10; i++)
        {
            entityCollection.CreateEntity(new TestBlueprint());
        }
    }

    public void Tick()
    {

    }

    public class TestBlueprint : IBlueprint
    {
        public void Apply(IEntity entity)
        {
            entity.AddComponents(new ComponentTest(), new ViewComponent("PanelTest"));
        }
    }
}

